<template>
  <div class="aa">
    <h1>{{ name }}</h1>
    <h1>{{ age }}</h1>
    <button @click="show">按钮</button>
    <button @click="changeName">修改名字</button>
    <button @click="changeAge">修改年龄</button>
  </div>
</template>

<script lang="ts">
export default {
  name: 'information',
}
</script>

<script lang="ts" setup>
import {ref} from 'vue'

let name = ref('张三')
let age = ref(18)
let tel = '12345678901'

function show() {
  alert(tel)
}

function changeName() {
  name.value = '李四'
  console.log(name)
}

function changeAge() {
  age.value += 1
  console.log(age)
}
</script>
<style>
.aa {
  background: aliceblue;
  padding: 20px;
  margin: 20px;
  border-radius: 6px;
}

button {
  margin: 0 10px;
}
</style>